<div id="slider" class="mui-slider banner">
    {assign name="banner" value=":get_ad(1)"}
    {if condition="$banner"}
    <div class="mui-slider-group mui-slider-loop">
        <!-- 额外增加的一个节点(循环轮播：第一个节点是最后一张轮播) -->
        {assign name="len" value=":count($banner)"}
        <div class="mui-slider-item mui-slider-item-duplicate">
            <a href="{$banner[$len-1]['link_url']|default='javascript:void(0)'}">
                <img src="/static/uploads/ad/{$banner[$len-1]['images']}">
            </a>
        </div>
        {foreach name="banner" id="value" key="index"}
        <div class="mui-slider-item {$index==0?'mui-active':''}">
            <a href="{$value['link_url']|default='javascript:void(0)'}">
                <img src="/static/uploads/ad/{$value['images']}">
            </a>
        </div>
        {/foreach}
        <!-- 额外增加的一个节点(循环轮播：最后一个节点是第一张轮播) -->
        <div class="mui-slider-item mui-slider-item-duplicate">
            <a href="{$banner[0]['link_url']|default='javascript:void(0)'}">
                <img src="/static/uploads/ad/{$banner[0]['images']}">
            </a>
        </div>
    </div>
    <div class="mui-slider-indicator">
        {foreach name="banner" id="value" key="index"}
        <div class="mui-indicator {$index==0?'mui-active':''}"></div>
        {/foreach}
    </div>
    {/if}
</div>
<script>
    mui(".banner").slider({
        interval: 1500
    });
</script>